package org.chs.ts.batch.pojo;

import lombok.Getter;
import lombok.Setter;

/**
 * @Compay 盛唐天行
 * @Author: wuwei
 * @Censor By wuwei
 * @Sence 2024/5/15 16:29
 * @Modify 2024/5/15 16:29
 * @Description
 */
@Setter
@Getter
public class TradeCapitalCheckErrorReq {

    public TradeCapitalCheckErrorReq(String lastTransDate, String currentTransDate, String transTime) {
        this.lastTransDate = lastTransDate;
        this.currentTransDate = currentTransDate;
        this.transTime = transTime;

        this.currentTransDateTime = getDateTimeStringFromString(currentTransDate, transTime);
        this.lastTransDateTime = getDateTimeStringFromString(lastTransDate, transTime);
    }

    private String getDateTimeStringFromString(String dateStr, String timeStr) {
        if (dateStr.length() != 8 || timeStr.length() != 6) {
            return "";
        }

        return dateStr.substring(0, 4) + "-" + dateStr.substring(4, 6) + "-" + dateStr.substring(6, 8) + " " + timeStr.substring(0, 2) + ":" + timeStr.substring(2, 4) + ":" + timeStr.substring(4, 6);
    }

    /**
     * 交易日期-交易日开始日期
     */
    private String lastTransDate;
    private String lastTransDateTime;

    /**
     * 交易日期-交易日结束日期
     */
    private String currentTransDate;
    private String currentTransDateTime;
    /**
     * 交易时间
     */
    private String transTime;
    /**
     * 差错状态
     */
    private String dealStatus;



}
